﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HyperPin_Database_Editor
{
    public partial class HPInstructionSettings : HPSettingsPanel
    {
        static string iniWidth = "Width";
        static string iniBottomX = "BottomX";
        static string iniCenterY = "CenterY";

        public HPInstructionSettings()
        {
            InitializeComponent();

            Rectangle bounds = Screen.GetBounds(this);
            numericWidth.Maximum = bounds.Height;
            numericBottomX.Maximum = bounds.Width;
            numericCenterY.Maximum = bounds.Height;
        }

        public override void doLoadSettings()
        {
            numericWidth.Value = readSettingInt(iniWidth, 600);
            numericBottomX.Value = readSettingInt(iniBottomX, 300);
            numericCenterY.Value = readSettingInt(iniCenterY, 360);
        }

        public override void doSaveSettings()
        {
            writeSettingInt(iniWidth, (int)numericWidth.Value);
            writeSettingInt(iniBottomX, (int)numericBottomX.Value);
            writeSettingInt(iniCenterY, (int)numericCenterY.Value);
        }

    }
}
